// //Inside b.js:
// define(["require", "a"],
//     function(require, a) {
//         //"a" in this case will be null if a also asked for b,
//         //a circular dependency.
//         return function(title) {
//             return require("a").doSomething();
//         }
//     }
// );

// *************
//Inside b.js:
// define(function(require, exports, module) {
//     //If "a" has used exports, then we have a real
//     //object reference here. However, we cannot use
//     //any of a's properties until after b returns a value.
//     var a = require("a");

//     exports.foo = function () {
//         return a.bar();
//     };
// });

// **************

//Inside b.js:
define(['a', 'exports'], function(a, exports) {
    //If "a" has used exports, then we have a real
    //object reference here. However, we cannot use
    //any of a's properties until after b returns a value.

    exports.foo = function () {
        return a.bar();
    };
});